
class Animal:

    def eat(self):
        print('吃---')

    def drink(self):
        print('喝---')

    def run(self):
        print('跑---')

    def sleep(self):
        print('睡---')


class Dog(Animal):
    def bark(self):
        print('哇哇叫')

class Cat(Animal):
    def catch(self):
        print('爬墙')

class XiaoTianQuan(Dog):
    def fly(self):
        print('会飞')

    def bark(self):
        """
        重写
        :return:
        """
        print('像神一样的叫唤')

        super().bark()  #调用父亲的方法用super


wangcai = Dog()
wangcai.bark()

xiaotian = XiaoTianQuan()
xiaotian.fly()
xiaotian.bark()

#super 相当于父亲的匿名对象